package com.shenghuai.bclient.stores.util

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.LayoutRes

object ViewUtil {
    fun inflateView(
        context: Context?, @LayoutRes layoutId: Int,
        group: ViewGroup?
    ): View? {
        return LayoutInflater.from(context).inflate(layoutId, group, false)
    }

    fun inflateView(view: View, @LayoutRes layoutId: Int, group: ViewGroup?): View? {
        return LayoutInflater.from(view.context).inflate(layoutId, group, false)
    }
}